import {createSlice} from "@reduxjs/toolkit"


const stuSlice = createSlice({
    name:'stu',
    initialState:{
        name:'float',
        age:18,
    },
    reducers:{
        setName(state, action){
            state.name = action.payload
            
        }
    }
})


export const {setName } = stuSlice.actions
export const {reducer:stuReducer} = stuSlice